package com.pactera.madp.cp.api.vo.workroom;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.NoArgsConstructor;

import java.util.List;

/**
 * WorkMassMsgVO
 *
 * @author jun
 * @version 1.0
 * 2021/7/13 14:34
 **/
@Data
@NoArgsConstructor
public class WorkMassMsgVO {

    @JSONField(name = "msgid")
    private String msgId;

    @JSONField(name = "creator")
    private String creator;

    @JSONField(name = "createTime")
    private Integer createTime;

    @JSONField(name = "text")
    private TextVO text;


    @NoArgsConstructor
    @Data
    public static class TextVO{
        @JSONField(name = "content")
        private String content;
    }

    @JSONField(name = "attachments")
    private List<AttachMentsVO> attachments;

    @NoArgsConstructor
    @Data
    public static class AttachMentsVO{

        @JSONField(name = "msgtype")
        private String msgType;

        @JSONField(name = "image")
        private List<ImageVO> image;

        @NoArgsConstructor
        @Data
        public static class ImageVO{

            @JSONField(name = "media_id")
            private String mediaId;

            @JSONField(name = "pic_url")
            private String picUrl;
        }

        @JSONField(name = "link")
        private List<LinkVO> link;

        @NoArgsConstructor
        @Data
        public static class LinkVO{

            @JSONField(name = "title")
            private String title;

            @JSONField(name = "picurl")
            private String picUrl;

            @JSONField(name = "desc")
            private String desc;

            @JSONField(name = "url")
            private String url;
        }

        @JSONField(name = "miniprogram")
        private List<MiniProgramVO> miniProgram;

        @NoArgsConstructor
        @Data
        public static class MiniProgramVO{

            @JSONField(name = "title")
            private String title;

            @JSONField(name = "pic_media_id")
            private String picMediaId;

            @JSONField(name = "appid")
            private String appid;

            @JSONField(name = "page")
            private String page;
        }

        @JSONField(name = "video")
        private List<VideoVO> video;

        @NoArgsConstructor
        @Data
        public static class VideoVO{
            @JSONField(name = "media_id")
            private String mediaId;
        }

    }


}
